OData Reports

Introduction

We’re pleased to announce that in Enersight 2.16.1 we now have the capability to generate OData tables based on the definition of a Report Favorite (aka Report Setting). This new capability means that it is much easier to get data out of the application in a format determined by you, the user, without your IT organization having to join or aggregate data or having to recreate your custom reporting variables not available from the OData service. Both user and company favorites are supported, with all report settings respected in the OData output.

Defining a Report Favorite

Report Favorites are defined in the Reportsing tab of the Enersight application. Report Favorites capture the selected report, report settings such as As Produced/As Sold, Interest Type, etc., groups/filters, and report periodicity settings.

Click image to expand or minimize. 

Report Groups and Filters

Report groups are supported but the data generated is the grouped values at the scenario object, facilities, as well as all asset detail – grouped values for all assets in the asset hierarchy. This can result in a lot of data being pulled via OData. TIf you only need to pull a subset of this data and reduce loading time, you can add ?$filter to your OData query (filtered to a particular ReportAsset to get grouped values for a specific facility, for example) as described below in the ‘Filtering to a Scenario Asset’ section.

Report Filters are supported (e.g., you can filter down to Wells by using a Filter with the Asset Type = Well), and the selected Unit System is respected when retrieving report data via OData.

Only links using OData4.enersight.net are capable of generating OData Reports.

OData Tables and Expected Behavior

For each defined Report Favorite, there are two OData tables available: one for the array (time series) data and one for the scalar data (if any) defined in the ‘header’ section of the report. These tables are created/updated when a Report Favorite is saved. Company and user favorites will be visible, but you will only see your user created favorites, not those created by other users.

The tables follow a naming pattern as follows: ReportDataArray _favorite_name for array data and ReportDataScalar_favorite_name for scalar data.

Scalar data is only generated for label-value pairs in report cells beside one another (i.e., the value is to the right of the label). Tables of scalar data are not currently supported, as they do not translate well to an OData table structure.

Constructing an OData Query

Query strings for OData reports look largely the same as those for our existing OData tables. Copy out the OData connection string from the Manage PDS screen and append /ReportDataArray_favorite_name (where favorite_name is the name of your saved Report Favorite, replacing spaces with underscores) to access a particular time series Report Favorite or /ReportDataScalar_favorite_name for scalar data.

If you browse to the OData link coped from the Manage PDS screen, you’ll see all of the available report tables list along with the previously existing OData tables.

Example: https://odata4.enersight.net/Versioncc699879-d621-4a77-b6e3-b2e9ab112f23/ReportDataArray_Econ_Summary_Net_10_years

Filtering to a Scenario Asset

Data for all assets is returned by default. For large data sets it is recommended to use Report Filters or an OData $filter to limit the number of rows returned.

However, it is not possible to create a Report Filter that limits the report data to a particular Scenario asset. Instead, the $filter parameter can be used on the OData query to filter down to a particular ReportAsset (the Scenario name in this case). This is equivalent to selecting a specific asset in the Asset Hierarchy in the Reports tab of Enersight.

For example, if your scenario name is Increase capacityScenario_1 and Report Favorite is named MyReport, the query would look like this (with the Versionxyzn substituted for your specific PDS OData link):

https://enersight.net/Odata4/Versionxyz/ReportDataArray_MyReport?$filter=ReportAsset eq ‘Scenario_1Increase capacity’

This returns the same data as clicking on Increase capacity in the Asset Hierarchy and selecting the Report Favorite MyReport:

Unsupported Features

The following features are currently unsupported when using OData Reports: Group by Flow Path, Incremental Result Type, Report label meta tags.

Also note that Project Level Report Groups are only available for the project in which they were created. Company level Report Groups are recommended.

Reports that do not have a date column (such as a drilling summary or Asset One-line summary) are not generated for OData Reports.